<extend name="Public/base"/>

<block name="body">
  <div class="main-title">
    <h2>收款单({$_total})</h2>
  </div>

  <!-- 按钮工具栏 -->
  <div class="cf">
    <div class="fl">
      <!--<button class="btn ajax-post confirm" url="{:U('del')}" target-form="ids">删 除</button>>
      <button-- class="btn ajax-post confirm" target-form="ids" url="{:U('setStatus',array('status'=>-1))}">删 除</button-->
      <a class="btn" href="{:U('index')}">刷 新</a>（点击"刷新"按钮清除搜索条件，显示全部信息。）
    </div>

    <!-- 高级搜索 -->
    <form action="{:U()}" method="GET" id="J_search_form">
    <div class="search-form fr cf">
      <div class="fl">
       <!--  <select name="flow">
          <option value="">资金流向</option>
          <option value="in">收入</option>
          <option value="out">支出</option>
        </select> -->
      </div>
      <div class="sleft">
        <input type="text" name="keywords" class="search-input" value="{:I('keywords')}" placeholder="请输入支付编号或订单编号">
        <a class="sch-btn" href="javascript:;" id="J_search"><i class="btn-search"></i></a>
      </div>
    </div>
    </form>
  </div>

  <!-- 数据表格 -->
  <div class="data-table table-striped">
    <form class="ids">
      <table>
        <thead>
          <tr>
            <th class="row-selected">
              <input class="checkbox check-all" type="checkbox">
            </th>
            <th>交易ID</th>
            <th>交易时间</th>
            <th>交易备注</th>
            <th>交易金额</th>
            <th>交易状态</th>
            <th width="80">操作</th>
          </tr>
        </thead>
        <tbody>
        <notempty name="list">
        <volist name="list" id="vo">
          <tr>
            <td><input class="ids row-selected" type="checkbox" name="ids[]" value="{$vo.id}"></td>
            <td>{$vo.id}</td>
            <td>{$vo.ctime|time_format}</td>
            <td>{$vo.remark}</td>
            <td><span class="{$vo['flow']=='in'?'text-danger':'text-success'}" style="display: inline-block;width: 60px;text-align: right;">{$vo['flow']=='in'?'+':'-'}{:sprintf('%.2f', $vo['amount'])}</span> 元</td>
            <td>{$vo['status']=='1'?'<span class="text-success">交易成功</span>':''}</a>{$vo['status']=='-1'?'<span class="text-danger">交易中</span>':''}{$vo['status']=='0'?'交易失败':''}</td>
            <td>
              <if condition="$vo['order_id']"><a title='查看' href="{:U('Order/view?id='.$vo['order_id'])}">[查看订单]</a></if>
              <!--a class="confirm ajax-get" title="删除" href="{:U('setStatus?status=-1&ids='.$vo['id'])}">[删除]</a-->
            </td>
          </tr>
        </volist>
        <else/>
        <tr><td colspan="10" class="text-center"> aOh! 暂时还没有内容! </td></tr>
        </notempty>
        </tbody>
      </table>
    </form>
    <!-- 分页 -->
    <div class="page">{$_page}</div>
  </div>
</block>

<block name="script">
  <script type="text/javascript">
    $(function(){
      Core.setValue('flow', '{:I("flow")}');
      //导航高亮
      highlight_subnav("{:U('index')}");
    });
  </script>
</block>